import 'package:flutter/material.dart';
import '../models/product.dart';
class ProductWidget extends StatelessWidget {
  final Product product;
  ProductWidget(this.product);
  @override
  Widget build(BuildContext context) {
    print(this.product.imageURL);
    return Container(
      child: Row(
        children: [
          Text("名称："+this.product.name),
          Text(" 价格："+this.product.price.toString()),
          Flexible(child: Align(
            alignment: Alignment.centerRight,
            child: Image.network(this.product.imageURL,width: 100,height: 50,),
          ))
        ],
      ),
    );
  }
}
